package com.lei.retrofitlibrary.http.api;

import com.google.gson.JsonObject;
import com.lei.retrofitlibrary.http.bean.TokenBean;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.POST;

/**
 * @ProjectName : YoHuo001Java
 * @Author : 雷金泷
 * @Time : 2020/12/11 16:14
 * @Description : 文件描述
 */
public interface API {
    @FormUrlEncoded
    @POST("token")
    Call<TokenBean> token(@Field("grant_type") String type, @Field("username") String username, @Field("password") String pwd);

    @POST("api/User/register")
    Observable<JsonObject> register(@Body RequestBody requestBody);
}
